package com.quanyan.common.constants;

import java.text.MessageFormat;

/**
 * @Author Hugo.Wwg
 * @Since 2016-04-15
 */
public class CacheConstants {

    public static final String USER_LOGIN_KEY = "ulk{0}";//
    public static final String PLACE_COMMON_DATA = "PLACE_COMMON_DATA";

    public static int SECONDS_OF_ONE_MINUTE = 60;
    public static int SECONDS_OF_TEN_MINUTE = 60 * 10;
    public static int SECONDS_OF_HALF_HOUR = 60 * 30;
    public static int SECONDS_OF_ONE_DAY = 60 * 60 * 24;
    public static int SECONDS_OF_THREE_DAY = 60 * 60 * 24 * 3;
    public static int SECONDS_OF_ONE_WEEK = 60 * 60 * 24 * 7;

    /**
     * 用户登录保存时间 五天
     */
    public static int TOKEN_EXPIRED_TIME = 5 ;

    public static Object buildUserInfoKey(String userId) {
        return MessageFormat.format(USER_LOGIN_KEY, userId);
    }
}
